package com.neo.impatient.C08_extends.C08_01_extendsClass

import ch.qos.logback.classic.pattern.ClassOfCallerConverter

class Employee extends Person{


  override def namePPP(): String = super.namePPP()


  override def forOverTest(): String = {
    super.forOverTest()

    "aa"
  }

  //仅任何子类访问
  protected[this] def myfuction(): String = "Helllll"

}

object Employee {


  def main(args: Array[String]): Unit = {

    val ee = new Employee()
    println(ee.namePPP())
    println(ee.forOverTest())

    if(ee.getClass == classOf[Employee])
      println("True")
    if(ee.isInstanceOf[Employee])
      println("True")

    ee match {

      case s: Employee => println(s.forOverTest())

      case _  => println("false")
    }
  }
}